import service from '../utils/request'

// 获取资产列表
export function asset_list(payload = {}) {
    return service.get('/api/AssetManage/getlist',  {params:payload} )
}

// 删除单条资产列表
export function delete_one( payload = {} ){
    return service.delete('/asset_list/'+payload.id, payload );
}

// 搜索资产
export function asset_search( payload = {} ){
    return service.get('/asset_list', { params: payload  } );
}

// 新增资产列表
export function asset_add( payload = {} ){
    return service.post('/asset_list', payload );
}


// 获取资产类别列表
export function asset_kind(payload = {}) {
    return service.get('/asset_kind',  {params:payload} )
}

// 搜索资产类别
export function kind_search( payload = {} ){
    return service.get('/asset_kind', { params: payload  } );
}

// 新增资产类别
export function kind_add( payload = {} ){
    return service.post('/asset_kind', payload );
}

// 单条删除资产类别
export function delete_kind( payload = {} ){
    return service.delete('/asset_kind/'+payload.id, payload );
}




// 获取采购单列表
export function buy_list(payload = {}) {
    return service.get('/buy_list',  {params:payload} )
}

// 删除采购单
export function delete_buy( payload = {} ){
    return service.delete('/buy_list/'+payload.id, payload );
}

// 搜索采购单
export function buy_search( payload = {} ){
    return service.get('/buy_list', { params: payload  } );
}



// 获取资产盘点列表
export function check_list(payload = {}) {
    return service.get('/check_list',  {params:payload} )
}

// 删除盘点
export function delete_check( payload = {} ){
    return service.delete('/check_list/'+payload.id, payload );
}

// 新增盘点
export function inventory_add( payload = {} ){
    return service.post('/check_list', payload );
}



// 获取仓库管理列表
export function manage_list(payload = {}) {
    return service.get('/manage_list',  {params:payload} )
}

// 删除单条仓库
export function delete_manage( payload = {} ){
    return service.delete('/manage_list/'+payload.id, payload );
}

// 允许员工查看的资产信息
export function setting(payload = {}) {
    return service.get('/setting',  {params:payload} )
}

// 设置 员工端业务表单列表
export function setting_form(payload = {}) {
    return service.get('/setting_form',  {params:payload} )
}

// 借用

export function borrow_list(payload = {}) {
    return service.get('/borrow_list',  {params:payload} )
}


